/*
 * Ch01ScopeLevels.cpp
 *
 *  Created on: 2012-8-29
 *      Author: JamesZOU
 */




#include <iostream>
#include <string>

std::string s1 = "hello";  // s1 has global scope

int scope_levels()
{
	std::string s2 = "world"; // s2 has local scope

	// uses global s1; prints ``hello world''
	std::cout << s1 << " " << s2 << std::endl;

	int s1 = 42; // s1 is local and hides global s1

	// uses local s1; prints ``42 world''
	std::cout << s1 << " " <<  s2 << std::endl;
	return 0;
}

//int main(){
//	return scope_levels();
//}
